#include "bsp_delay.h"

#include "bsp.h"

#if BSP_DELAY_SYSTICK_ENABLE > 0

extern uint32_t SystemCoreClock;
void bsp_delay_us(uint32_t us) {}

void bsp_delay_ms(uint32_t ms) {
  uint32_t tick;

  tick = bsp_get_tick();

  tick += ms;

  while (tick != bsp_get_tick()) {
  }
}

int bsp_delay_init() { return 0; }

#endif /* BSP_DELAY_SYSTICK_ENABLE */